{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "'''\n",
    "【课程2.3】  数据归一化/标准化\n",
    "\n",
    " 数据的标准化（normalization）是将数据按比例缩放，使之落入一个小的特定区间。\n",
    " 在某些比较和评价的指标处理中经常会用到，去除数据的单位限制，将其转化为无量纲的纯数值，便于不同单位或量级的指标能够进行比较和加权\n",
    " \n",
    "最典型的就是数据的归一化处理，即将数据统一映射到[0,1]区间上\n",
    "\n",
    "0-1标准化 / Z-score标准化\n",
    "\n",
    "'''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "% matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "      value1     value2\n",
      "0   1.058973  80.176250\n",
      "1   2.268353  72.748326\n",
      "2   8.845245  38.677480\n",
      "3   6.787782  61.089715\n",
      "4  19.699524  91.723522\n",
      "------\n",
      "      value1     value2  value1_n  value2_n\n",
      "0   1.058973  80.176250  0.000000  0.741446\n",
      "1   2.268353  72.748326  0.064879  0.618601\n",
      "2   8.845245  38.677480  0.417706  0.055126\n",
      "3   6.787782  61.089715  0.307330  0.425787\n",
      "4  19.699524  91.723522  1.000000  0.932418\n"
     ]
    }
   ],
   "source": [
    "# 数据标准化\n",
    "# （1）0-1标准化\n",
    "# 将数据的最大最小值记录下来，并通过Max-Min作为基数（即Min=0，Max=1）进行数据的归一化处理\n",
    "# x = (x - Min) / (Max - Min)\n",
    "\n",
    "df = pd.DataFrame({\"value1\":np.random.rand(10)*20,\n",
    "                  'value2':np.random.rand(10)*100})\n",
    "print(df.head())\n",
    "print('------')\n",
    "# 创建数据\n",
    "\n",
    "def data_norm(df,*cols):\n",
    "    df_n = df.copy()\n",
    "    for col in cols:\n",
    "        ma = df_n[col].max()\n",
    "        mi = df_n[col].min()\n",
    "        df_n[col + '_n'] = (df_n[col] - mi) / (ma - mi)\n",
    "    return(df_n)\n",
    "# 创建函数，标准化数据\n",
    "\n",
    "df_n = data_norm(df,'value1','value2')\n",
    "print(df_n.head())\n",
    "# 标准化数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "      value1     value2\n",
      "0  87.320919  48.352809\n",
      "1  26.031312   7.175187\n",
      "2  30.446934  51.214317\n",
      "3  95.423791  86.417366\n",
      "4  83.931369  82.795884\n",
      "------\n",
      "      value1     value2  value1_Zn  value2_Zn\n",
      "0  87.320919  48.352809   0.910447  -0.206182\n",
      "1  26.031312   7.175187  -0.853275  -1.425002\n",
      "2  30.446934  51.214317  -0.726208  -0.121484\n",
      "3  95.423791  86.417366   1.143622   0.920495\n",
      "4  83.931369  82.795884   0.812906   0.813302\n",
      "5  42.323130  77.843953  -0.384448   0.666730\n",
      "6  92.152700   2.869294   1.049490  -1.552452\n",
      "7  15.126391  78.057041  -1.167085   0.673037\n",
      "8   7.050190  24.868290  -1.399492  -0.901302\n",
      "9  77.020849  93.592031   0.614043   1.132858\n",
      "标准化后value1的均值为:0.00, 标准差为：1.00\n"
     ]
    }
   ],
   "source": [
    "# 数据标准化\n",
    "# （2）Z-score标准化\n",
    "# Z分数（z-score）,是一个分数与平均数的差再除以标准差的过程 → z=(x-μ)/σ，其中x为某一具体分数，μ为平均数，σ为标准差\n",
    "# Z值的量代表着原始分数和母体平均值之间的距离，是以标准差为单位计算。在原始分数低于平均值时Z则为负数，反之则为正数\n",
    "# 数学意义：一个给定分数距离平均数多少个标准差?\n",
    "\n",
    "df = pd.DataFrame({\"value1\":np.random.rand(10) * 100,\n",
    "                  'value2':np.random.rand(10) * 100})\n",
    "print(df.head())\n",
    "print('------')\n",
    "# 创建数据\n",
    "\n",
    "def data_Znorm(df, *cols):\n",
    "    df_n = df.copy()\n",
    "    for col in cols:\n",
    "        u = df_n[col].mean()\n",
    "        std = df_n[col].std()\n",
    "        df_n[col + '_Zn'] = (df_n[col] - u) / std\n",
    "    return(df_n)\n",
    "# 创建函数，标准化数据\n",
    "\n",
    "df_z = data_Znorm(df,'value1','value2')\n",
    "u_z = df_z['value1_Zn'].mean()\n",
    "std_z = df_z['value1_Zn'].std()\n",
    "print(df_z)\n",
    "print('标准化后value1的均值为:%.2f, 标准差为：%.2f' % (u_z, std_z))\n",
    "# 标准化数据\n",
    "# 经过处理的数据符合标准正态分布，即均值为0，标准差为1\n",
    "\n",
    "# 什么情况用Z-score标准化：\n",
    "# 在分类、聚类算法中，需要使用距离来度量相似性的时候，Z-score表现更好"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>value1</th>\n",
       "      <th>value2</th>\n",
       "      <th>value1_n</th>\n",
       "      <th>value2_n</th>\n",
       "      <th>f</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>23.927355</td>\n",
       "      <td>99.066097</td>\n",
       "      <td>0.808557</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.885134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>20.015661</td>\n",
       "      <td>52.019939</td>\n",
       "      <td>0.674994</td>\n",
       "      <td>0.487658</td>\n",
       "      <td>0.600060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>29.534207</td>\n",
       "      <td>7.240362</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.600000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>21.891125</td>\n",
       "      <td>40.366034</td>\n",
       "      <td>0.739031</td>\n",
       "      <td>0.360745</td>\n",
       "      <td>0.587716</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>12.447608</td>\n",
       "      <td>76.654287</td>\n",
       "      <td>0.416586</td>\n",
       "      <td>0.755931</td>\n",
       "      <td>0.552324</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>12.570029</td>\n",
       "      <td>53.480681</td>\n",
       "      <td>0.420766</td>\n",
       "      <td>0.503566</td>\n",
       "      <td>0.453886</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>2.060190</td>\n",
       "      <td>94.382541</td>\n",
       "      <td>0.061913</td>\n",
       "      <td>0.948995</td>\n",
       "      <td>0.416746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0.644139</td>\n",
       "      <td>84.523030</td>\n",
       "      <td>0.013563</td>\n",
       "      <td>0.841623</td>\n",
       "      <td>0.344787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>0.246922</td>\n",
       "      <td>31.857919</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.268090</td>\n",
       "      <td>0.107236</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3.962916</td>\n",
       "      <td>8.602333</td>\n",
       "      <td>0.126881</td>\n",
       "      <td>0.014832</td>\n",
       "      <td>0.082061</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      value1     value2  value1_n  value2_n         f\n",
       "A  23.927355  99.066097  0.808557  1.000000  0.885134\n",
       "C  20.015661  52.019939  0.674994  0.487658  0.600060\n",
       "F  29.534207   7.240362  1.000000  0.000000  0.600000\n",
       "J  21.891125  40.366034  0.739031  0.360745  0.587716\n",
       "D  12.447608  76.654287  0.416586  0.755931  0.552324\n",
       "G  12.570029  53.480681  0.420766  0.503566  0.453886\n",
       "E   2.060190  94.382541  0.061913  0.948995  0.416746\n",
       "I   0.644139  84.523030  0.013563  0.841623  0.344787\n",
       "B   0.246922  31.857919  0.000000  0.268090  0.107236\n",
       "H   3.962916   8.602333  0.126881  0.014832  0.082061"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAFnCAYAAAA7VkqGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X98lXX9//HHazIcSP4YEISIiJmaKSqGQKZmNo3kWKmg\noCWUP5IfCcoq8RNGUUKG5kSyHCmmEz8SU1Njfj6KSn6JZImZ0g9FF5gKDDSYCLLX949zxmcb48fZ\nOWfXdd573m+3c5u8d13XeT29Ns6L63pf12XujoiIiLRfBVEXICIiItFSMyAiItLOqRkQERFp59QM\niIiItHNqBkRERNo5NQMiIiLtnJoBERGRdk7NgIiISDunZkBERKSdUzMgIiLSzrWqGTCzqWa2xsw2\nmdkCM+u6i+W+aWb/NLMtZvZHMzsxs3JFREQk29JuBsysFBgHXAacCRwN3NXCcl8BbgNmAKcAa4Df\nm9kBGdQrIiIiWWbpPKjIzAx4G/ihu5elxs4GHgX6ufsbjZb9I/BHd5+Q+nNn4F/A9919dvYiiIiI\nSCbSPTJwLNAVWNRobDHgwKBmy34SeKHhD+5eBzwPnJx2lSIiIpIzHdJcvl/q66qGAXffYmZrgYOb\nLbseOLTZ2P4kGwcRERGJiXSbgS5AvbtvazZeBxQ1G3sQuNLMHgOqgTHAp2l6VGGH1CTEs4DXgS1p\n1iUiItKeFQF9gUXuvj7dldNtBj4ACsyswN3rmxVR12zZqSSPFjxH8mjAYuB/gXd2se2zgHvTr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GTAb4Gvm9mEFh6VHHd1JCdFf8Td/xN1MVm0FBjN\n/51nX7ubZfNJCJMIW9KT/DrkuZnk783+7v5eaqwCeIrkQ9GeIB7/cGmNUH938l3DftkPOAmYY2Z9\n3X1GtGW1SvOfsQZ/TWcjUU8gvITkX8hP8H9BGv6CPgdYGEVRGXiBZI7PAXk1m3sP6tz9H1EXkUX7\npb7WRlpFDpiZASXAvKhrSUM1yd+b00g+9IxUU/CemX1Afk/2DO13JxSN98sLZvZRkvNs8rEZaPFn\nLPlXwd6LrNtOHQkYAdwJfJpkd3ZS6r//SfL0QV5x9zeA/wV+aGb77Wl5icwnga2kHsMdmOuBg4C8\neTKou68mOV9gWmoyoUhb2wfItyPRWRXlkYEvAt2A2e7+YuNvpB5/fIOZHdj4sch54jKS9xZYambT\ngRUk/3I+Gdjg7ndFWFu71ui88/XAve7+fpT1ZEEnMzuc5O9xP5KHCkuALzc+/54nriD5e/P/zOxG\nkr83HwHOI79P5zTsox3c/dWoismEmXUnORelk5n1cvc3o64pAw37pSPJv5snkZxI2G5F2QxcDPy1\neSOQcjfwQ5JHDu5o06oy5O6vm9lJJD9wbiR5/vZdkudvboiwNEley34K8DjJX/58N4Tk/QW2AauB\nRUD/1BGqvOLub6Z+b64DppGcK7CR5FHCb5M8BZePGvYRJE93uJkVunt9hDW11kzg/NR//wY4I8Ja\nMtWwXz4EVpG8P8zPIq0o+9JqovXUQhERkXYuX2foioiISJaoGRAREWnn1AyIiIi0c2oGRERE2jk1\nAyZVRCIAAAA7SURBVCIiIu2cmgEREZF2Ts2AiIhIO6dmQEREpJ1TMyAiItLOqRkQERFp59QMiIiI\ntHNqBkRERNq5/w9M9kk+dVdu3gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb1e9898>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 案例应用\n",
    "# 八类产品的两个指标value1，value2，其中value1权重为0.6，value2权重为0.4\n",
    "# 通过0-1标准化，判断哪个产品综合指标状况最好\n",
    "\n",
    "df = pd.DataFrame({\"value1\":np.random.rand(10) * 30,\n",
    "                  'value2':np.random.rand(10) * 100},\n",
    "                 index = list('ABCDEFGHIJ'))\n",
    "#print(df.head())\n",
    "#print('------')\n",
    "# 创建数据\"\n",
    "\n",
    "df_n1 = data_norm(df,'value1','value2')\n",
    "# 进行标准化处理\n",
    "\n",
    "df_n1['f'] = df_n1['value1_n'] * 0.6 + df_n1['value2_n'] * 0.4\n",
    "df_n1.sort_values(by = 'f',inplace=True,ascending=False)\n",
    "df_n1['f'].plot(kind = 'line', style = '--.k', alpha = 0.8, grid = True)\n",
    "df_n1\n",
    "# 查看综合指标状况"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
